package com.xiaoma.myaudience.biz.model;

import org.json.JSONException;
import org.json.JSONObject;

import android.os.Parcel;
import android.os.Parcelable;

public class HeadlineVideoInfo extends BaseVideoInfo{

    public static final String PARAM_DIGEST = "digest";
    
    public String mDigest;

    @Override
    public void readFromJSONObject(JSONObject o) throws JSONException{
        super.readFromJSONObject(o);
        if (o != null) {
            mDigest = o.getString(PARAM_DIGEST);
        }
    }

    @Override
    public void writeToParcel(Parcel parcel, int paramInt) {
        super.writeToParcel(parcel, paramInt);
        parcel.writeString(mDigest);
        
    }  
    
    @Override
    public void readFromParcel(Parcel source) {
        super.readFromParcel(source);
        mDigest = source.readString();
    }

    public static final Parcelable.Creator<HeadlineVideoInfo> CREATOR = new Creator<HeadlineVideoInfo>() {
        public HeadlineVideoInfo createFromParcel(Parcel source) {
            HeadlineVideoInfo info = new HeadlineVideoInfo();
            info.readFromParcel(source);
            return info;
        }

        public HeadlineVideoInfo[] newArray(int size) {
            return new HeadlineVideoInfo[size];
        }
    };
}
